﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RMS.Common
{
    public class ConfigHelper
    {
        /// <summary>
        /// 获取.config文件的appSettings里的值
        /// </summary>
        /// <param name="key">appSettings的key</param>
        /// <param name="defaultValue">默认值</param>
        /// <returns></returns>
        public static string GetAppValue(string key, string defaultValue = "")
        {
            var result = ConfigurationManager.AppSettings[key] ?? defaultValue;
            return result;
        }
    }
}
